@echo Deploying XmlPowerViewer
IF [%1]==[] (
  set APPURL=http://davidwalker
) else (
  set APPURL=%1
)
rem echo Deleting old Solution file
rem del *.wsp

rem echo Creating new Solution file
rem makecab /f XmlPowerViewer.ddf

@set PATH=C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN;%PATH%

echo Deactivating feature
stsadm -o deactivatefeature -name XmlPowerViewer -force -url %APPURL%

echo Retacting solution
stsadm -o retractsolution -name XmlPowerViewer.wsp -immediate -allcontenturls
stsadm -o execadmsvcjobs
rem pause

echo Deleting solution
stsadm -o deletesolution -name XmlPowerViewer.wsp -override
stsadm -o execadmsvcjobs
rem pause

echo Adding solution
stsadm -o addsolution -filename XmlPowerViewer.wsp 
stsadm -o execadmsvcjobs
rem pause

echo Deploying solution
stsadm -o deploysolution -name XmlPowerViewer.wsp -immediate -allowGacDeployment -allContentUrls
stsadm -o execadmsvcjobs

echo Activating feature
stsadm -o activatefeature -name XmlPowerViewer -url %APPURL%

